<div class="container">
    <div ng-show="vm.order.data.orders.length == 0">
        暂无订单哦！
    </div>
    <div ng-show="vm.order.data.orders.length != 0">
        <div class="row" ng-repeat="order in vm.order.data.orders" ng-init="vm.fixAddress(order.address)">
            <div class="col-sm-4">
                <table style="width:100%;" border="4">
                    <tr>
                        <td>订单信息（{{vm.order.states[order.state]}}）</td>
                    </tr>
                    <tr>
                        <td>订单编号：{{order.id}}</td>
                    </tr>
                    <tr ng-show="order.state>=3">
                        <td>货单号:{{order.post_id}}<p></p>
                            邮寄公司:{{order.post_company}}
                        </td>
                    </tr>
                    <tr>
                        <td>收货地址:{{order.address.province.name}}{{order.address.city.name}}{{order.address.county.DisName}}{{order.address.detail}}<p></p>
                            收货人:{{order.address.name}}<p></p>
                            联系电话:{{order.address.phone}}
                        </td>
                    </tr>
                    <tr>
                        <td>下单时间：{{order.date}}</td>
                    </tr>
                    <tr>
                        <td>订单金额：{{order.expect_pay}}</td>
                    </tr>
                </table>
                <div class="row">
                    <div class="col-sm-3">
                        <a class="btn btn-primary" ng-show="order.state == 1" href="#/pay/{{order.id}}-{{order.expect_pay}}">去支付</a>
                    </div>
                    <div class="col-sm-3">
                        <button class="btn btn-default" ng-show="order.state == 1" ng-click="vm.remove(order);">取消订单</button>
                    </div>
                    <div class="col-sm-3">
                        <button ng-hide="true" type="button" ng-show="order.state >= 3">查看物流</button>
                    </div>
                    <div class="col-sm-3">
                        <a class="btn btn-primary" ng-show="order.state == 3" ng-click="vm.setReceived(order)">确认收货</a>
                    </div>
                    <div class="col-sm-3">
                        <button ng-hide="true" type="button" ng-show="order.state == 3">申请退货</button>
                    </div>
                </div>
            </div>
            <div class="col-sm-8">
                <div class="row">
                    <div class="col-sm-12" >
                        <div class="row">
                            <div class="col-sm-6 col-md-4  rj-card" ng-repeat="product in order.items">
                                <div class="row">
                                    <div class="col-sm-6">
                                        <img ng-click="utility.showModalImage(product.product.images[0].url)" class="rj-link hidden-xs" style="width: 100%;" ng-src="{{product.product.images[0].url}}">
                                    </div>
                                    <div class="col-sm-6">
                                        <div>{{product.product.name}}</div>
                                        <p></p>
                                        <div>{{product.number}}</div>
                                        <p></p>
                                        <div>{{product.message}}</div>
                                        <p></p>
                                        <a type="button" ng-show="order.state == 4" href="#/product/{{product.product_id}}" >去评价</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <hr class="col-sm-12"/>
        </div>
    </div>
</div>